package com.ybkj.o2o.zhuanche.entity;

import com.ybkj.o2o.zhuanche.common.json.DateTimeJsonSerializer;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.io.Serializable;
import java.util.Date;

/**
 * 车型与公司的关联对象.
 * @author hqb
 *
 */
public class CarTypeCompany implements Serializable {

  private Long id;
  @JsonSerialize(using = DateTimeJsonSerializer.class)
  private Date created;
  @JsonSerialize(using = DateTimeJsonSerializer.class)
  private Date updated;

  private Long carTypeId;// 车型Id

  private Long companyId;// 公司Id

  private String companyName;// 公司名称

  private Integer sequence;// 排序
  
  private String appKey;//区分系统

  private static final long serialVersionUID = 1L;

  private Long tangzuAreaId;

  private Long rizuAreaId;

  private Long banrizuAreaId;

  private Long jiejiAreaId;

  private Long songjiAreaId;

  private Long jiezhanAreaId;

  private Long songzhanAreaId;

  private String tangzuAreaName;

  private String rizuAreaName;

  private String banrizuAreaName;

  private String jiejiAreaName;

  private String songjiAreaName;

  private String jiezhanAreaName;

  private String songzhanAreaName;


  public String getAppKey() {
    return appKey;
  }

  public void setAppKey(String appKey) {
    this.appKey = appKey;
  }

  public Long getTangzuAreaId() {
    return tangzuAreaId;
  }

  public void setTangzuAreaId(Long tangzuAreaId) {
    this.tangzuAreaId = tangzuAreaId;
  }

  public Long getRizuAreaId() {
    return rizuAreaId;
  }

  public void setRizuAreaId(Long rizuAreaId) {
    this.rizuAreaId = rizuAreaId;
  }

  public Long getBanrizuAreaId() {
    return banrizuAreaId;
  }

  public void setBanrizuAreaId(Long banrizuAreaId) {
    this.banrizuAreaId = banrizuAreaId;
  }

  public Long getJiejiAreaId() {
    return jiejiAreaId;
  }

  public void setJiejiAreaId(Long jiejiAreaId) {
    this.jiejiAreaId = jiejiAreaId;
  }

  public Long getSongjiAreaId() {
    return songjiAreaId;
  }

  public void setSongjiAreaId(Long songjiAreaId) {
    this.songjiAreaId = songjiAreaId;
  }

  public Long getJiezhanAreaId() {
    return jiezhanAreaId;
  }

  public void setJiezhanAreaId(Long jiezhanAreaId) {
    this.jiezhanAreaId = jiezhanAreaId;
  }

  public Long getSongzhanAreaId() {
    return songzhanAreaId;
  }

  public void setSongzhanAreaId(Long songzhanAreaId) {
    this.songzhanAreaId = songzhanAreaId;
  }

  public String getTangzuAreaName() {
    return tangzuAreaName;
  }

  public void setTangzuAreaName(String tangzuAreaName) {
    this.tangzuAreaName = tangzuAreaName;
  }

  public String getRizuAreaName() {
    return rizuAreaName;
  }

  public void setRizuAreaName(String rizuAreaName) {
    this.rizuAreaName = rizuAreaName;
  }

  public String getBanrizuAreaName() {
    return banrizuAreaName;
  }

  public void setBanrizuAreaName(String banrizuAreaName) {
    this.banrizuAreaName = banrizuAreaName;
  }

  public String getJiejiAreaName() {
    return jiejiAreaName;
  }

  public void setJiejiAreaName(String jiejiAreaName) {
    this.jiejiAreaName = jiejiAreaName;
  }

  public String getSongjiAreaName() {
    return songjiAreaName;
  }

  public void setSongjiAreaName(String songjiAreaName) {
    this.songjiAreaName = songjiAreaName;
  }

  public String getJiezhanAreaName() {
    return jiezhanAreaName;
  }

  public void setJiezhanAreaName(String jiezhanAreaName) {
    this.jiezhanAreaName = jiezhanAreaName;
  }

  public String getSongzhanAreaName() {
    return songzhanAreaName;
  }

  public void setSongzhanAreaName(String songzhanAreaName) {
    this.songzhanAreaName = songzhanAreaName;
  }


  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public Date getCreated() {
    return created;
  }

  public void setCreated(Date created) {
    this.created = created;
  }

  public Date getUpdated() {
    return updated;
  }

  public void setUpdated(Date updated) {
    this.updated = updated;
  }

  public Long getCarTypeId() {
    return carTypeId;
  }

  public void setCarTypeId(Long carTypeId) {
    this.carTypeId = carTypeId;
  }

  public Long getCompanyId() {
    return companyId;
  }

  public void setCompanyId(Long companyId) {
    this.companyId = companyId;
  }

  public String getCompanyName() {
    return companyName;
  }

  public void setCompanyName(String companyName) {
    this.companyName = companyName == null ? null : companyName.trim();
  }

  public Integer getSequence() {
    return sequence;
  }

  public void setSequence(Integer sequence) {
    this.sequence = sequence;
  }

  @Override
  public boolean equals(Object that) {
    if (this == that) {
      return true;
    }
    if (that == null) {
      return false;
    }
    if (getClass() != that.getClass()) {
      return false;
    }
    CarTypeCompany other = (CarTypeCompany) that;
    return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
        && (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(
            other.getCreated()))
        && (this.getUpdated() == null ? other.getUpdated() == null : this.getUpdated().equals(
            other.getUpdated()))
        && (this.getCarTypeId() == null ? other.getCarTypeId() == null : this.getCarTypeId()
            .equals(other.getCarTypeId()))
        && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId()
            .equals(other.getCompanyId()))
        && (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName()
            .equals(other.getCompanyName()));
  }

  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
    result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
    result = prime * result + ((getUpdated() == null) ? 0 : getUpdated().hashCode());
    result = prime * result + ((getCarTypeId() == null) ? 0 : getCarTypeId().hashCode());
    result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
    result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode());
    return result;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append(getClass().getSimpleName());
    sb.append('[');
    sb.append("Hash = ").append(hashCode());
    sb.append(", id=").append(id);
    sb.append(", created=").append(created);
    sb.append(", updated=").append(updated);
    sb.append(", carTypeId=").append(carTypeId);
    sb.append(", companyId=").append(companyId);
    sb.append(", companyName=").append(companyName);
    sb.append(", serialVersionUID=").append(serialVersionUID);
    sb.append(']');
    return sb.toString();
  }
}
